
#ifndef CONFIG_H
#define CONFIG_H

#pragma warning(disable:4251)

#include <BColor>
#include <BObject>
#include <BXmlNode>
#include <BString>

using namespace BWE;

class Config : public BObject
{
public:
	Config();
	~Config();

	bool load();
	bool save();

	bool isDirty() const;

	void setGridLineVisual(bool gridLineVisual);
	bool gridLineVisual() const;

	void setGridLineSize(BReal gridLineSize);
	BReal gridLineSize() const;

	void setGridLineSegments(int gridLineSegments);
	int gridLineSegments() const;

	void setGridLineColor(const BColor& gridLineColor);
	const BColor& gridLineColor() const;

	void setTargetSpaceVisual(bool targetSpaceVisual);
	bool targetSpaceVisual() const;
	void setTargetSpaceColor(const BColor& color);
	const BColor& targetSpaceColor() const;

	void setObjectSpaceVisual(bool objectSpaceVisual);
	bool objectSpaceVisual() const;
	void setObjectSpaceColor(const BColor& color);
	const BColor& objectSpaceColor() const;

	void setShapeSpaceVisual(bool shapeSpaceVisual);
	bool shapeSpaceVisual() const;
	void setShapeSpaceColor(const BColor& color);
	const BColor& shapeSpaceColor() const;

	void setTargetBoxVisual(bool targetBoxVisual);
	bool targetBoxVisual() const;
	void setTargetBoxColor(const BColor& color);
	const BColor& targetBoxColor() const;

	void setObjectBoxVisual(bool objectBoxVisual);
	bool objectBoxVisual() const;
	void setObjectBoxColor(const BColor& color);
	const BColor& objectBoxColor() const;

	void setShapeBoxVisual(bool shapeBoxVisual);
	bool shapeBoxVisual() const;
	void setShapeBoxColor(const BColor& color);
	const BColor& shapeBoxColor() const;

	void setSelectionInspecting(bool selectionInspecting);
	bool selectionInspecting() const;

	void setShowTabs(bool show);
	bool showTabs() const;

	void setShowSpaces(bool show);
	bool showSpaces() const;

	void setShowReturns(bool show);
	bool showReturns() const;

	void setShowLinefeeds(bool show);
	bool showLinefeeds() const;

private:
	mutable bool	_dirty;

	bool			_gridLineVisual;
	BReal			_gridLineSize;
	int				_gridLineSegments;
	BColor			_gridLineColor;

	bool			_targetSpaceVisual;
	BColor			_targetSpaceColor;
	bool			_objectSpaceVisual;
	BColor			_objectSpaceColor;
	bool			_shapeSpaceVisual;
	BColor			_shapeSpaceColor;

	bool			_targetBoxVisual;
	BColor			_targetBoxColor;
	bool			_objectBoxVisual;
	BColor			_objectBoxColor;
	bool			_shapeBoxVisual;
	BColor			_shapeBoxColor;

	bool			_selectionInspecting;
	bool			_showTabs;
	bool			_showSpaces;
	bool			_showReturns;
	bool			_showLinefeeds;

};

#endif
